﻿using strange.extensions.context.impl;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace NormalBattleIoc {
    public class NormalBattleIocContext : MVCSContext
    {

        /**
           * Constructor
           */
        public NormalBattleIocContext(MonoBehaviour contextView) : base(contextView)
        {
        }

        protected override void mapBindings()
        {


            base.mapBindings();

            // we bind a command to StartSignal since it is invoked by SignalContext (the parent class) during on Launch()

            // commandBinder.Bind<MyShotGameSignal>().To<MoveCommand>().Pooled(); // THIS IS THE NEW MAPPING!!!
            //commandBinder.Bind<ScoreChangedSignal>().To<FireCommand>();

            // commandBinder.Bind(GameEvent.ComandBindFire).To<FireCommand>();

            SceneLoadManager.Instance.TestFunc();
            BattleCreateManager.Instance.TestFunc();
            GameDataManager.Instance.TestFunc();

            // bind our view to its mediator
            mediationBinder.Bind<PersonOperationView>().To<PersonOperationMediator>();
            mediationBinder.Bind<TankOperationView>().To<TankOperationMediator>();

            mediationBinder.Bind<PersonSelectEnemyView>().To<PersonSelectEnemyMediator>();
            mediationBinder.Bind<TurnBattleEventView>().To<TurnBattleEventMediator>();
            mediationBinder.Bind<GameOverView>().To<GameOverMediator>();
            mediationBinder.Bind<WinPanelView>().To<WinPanelMediator>();
            mediationBinder.Bind<PlayerInfoPanelView>().To<PlayerInfoPanelMediator>();





            //绑定开始事件 一个startcommand
            //commandBinder.Bind(ContextEvent.START).To<FireCommand>().Once();


        }
    }

}